package iosr11.example;

import iosr11.Service.ProjectGroupService;
import iosr11.Service.ProjectSubjectService;
import iosr11.Service.ServiceLocatorImpl_old;
import iosr11.data.ProjectGroup;
import iosr11.data.ProjectSubject;

public class ProjectSubjectServiceMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ProjectSubjectService pss = (ProjectSubjectService) ServiceLocatorImpl_old.getInstance().getService(ProjectSubject.class);
		ProjectSubject ps = new ProjectSubject();
		ProjectGroupService pgs = (ProjectGroupService) ServiceLocatorImpl_old.getInstance().getService(ProjectGroup.class);
		
		ps.setTopic("Zapisy na zajęcia");
		ps.setDescription("Java");
		ps.setGroup(null);
		System.out.println(ps);
		//System.out.println(pss.addProjectSubject(ps));
		System.out.println(pss.getAll());
		
		ProjectGroup grp = pgs.getProjectGroup("iosr01");
		System.out.println(grp);
		
		ProjectSubject sub = pss.getAll().get(2);
		System.out.println(sub.getTopic());
		System.out.println(sub.getGroup());
		
		//System.out.println(pgs.setSubject(grp, sub));
		//pss.deleteProjectSubject(pss.getAll().get(0));
		System.out.println(pss.getAll());
	}

}
